import java.util.Iterator;
import java.util.LinkedList;
import java.util.Stack;
 class LinkNode<Item>{
    Item val;
    LinkNode next;
    public LinkNode(){

    }
    public LinkNode(Item val){
        this.val = val;
    }
}

public class TextDemo {
    public static void main(String[] args) {
        LinkNode<String> first = new LinkNode<>("to");
        LinkNode<String> second = new LinkNode<>("be");
        LinkNode<String> third = new LinkNode<>("or");
        first.next = second;
        second.next = third;
        LinkNode oldhead = first;
        first = new LinkNode<>("not");
        first.next = oldhead;


    }
}
